package com.sdgakj.enums;

public enum EnumOrderType {
    GPSSERVICE(1, "北斗导航订单"), DETECT(2, "年检订单"), MEAL(3, "套餐订单");

    private Integer code;

    private String name;

    private EnumOrderType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static EnumOrderType getEnum(String value) {
        for (EnumOrderType e : EnumOrderType.values()) {
            if (value.equals(e.getCode())) {
                return e;
            }
        }
        return null;
    }
}
